﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using Jbe.TestSuite.TestDevices.FunctionGenerator.ControlView.Properties;

namespace Jbe.TestSuite.TestDevices.FunctionGenerator.ControlView.Presentation
{
    internal class BoolToStringConverter : IValueConverter
    {
        private static readonly BoolToStringConverter @default = new BoolToStringConverter();

        public static BoolToStringConverter Default { get { return @default; } }


        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool)
            {
                return ((bool)value) ? Resources.True : Resources.False;
            }
            throw new NotSupportedException();
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
